/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package Interface.MenuInicial;

import Interface.Admin.MenuAdministrador;
import Interface.Participante.InscreverParticipante;
import javax.swing.JFrame;

/**
 *
 * @author ana.siena
 */
public class MenuIniciar extends javax.swing.JFrame {

    /**
     * Creates new form MenuIniciar
     */
    public MenuIniciar() {
        initComponents();
        init();
    }
    
    private void init(){
	setVisible(true);
        setTitle("Menu Inicial");
        setLocationRelativeTo(null);
        setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        botaoInscrever = new javax.swing.JButton();
        BotaoAdmin = new javax.swing.JButton();
        TituloMenuInicial = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        botaoInscrever.setText("Inscrever-se");
        botaoInscrever.addActionListener(new java.awt.event.ActionListener() {
            @Override
			public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoInscreverActionPerformed(evt);
            }
        });

        BotaoAdmin.setText("Administrar");
        BotaoAdmin.addActionListener(new java.awt.event.ActionListener() {
            @Override
			public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotaoAdminActionPerformed(evt);
            }
        });

        TituloMenuInicial.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        TituloMenuInicial.setText("Bem-vindo ao sistema criador de eventos! :)");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(36, Short.MAX_VALUE)
                .addComponent(TituloMenuInicial)
                .addGap(32, 32, 32))
            .addGroup(layout.createSequentialGroup()
                .addGap(122, 122, 122)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(BotaoAdmin, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(botaoInscrever, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(21, Short.MAX_VALUE)
                .addComponent(TituloMenuInicial)
                .addGap(27, 27, 27)
                .addComponent(botaoInscrever, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(BotaoAdmin)
                .addGap(32, 32, 32))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void botaoInscreverActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoInscreverActionPerformed
        // TODO add your handling code here:
        new InscreverParticipante().setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_botaoInscreverActionPerformed

    private void BotaoAdminActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotaoAdminActionPerformed
        // TODO add your handling code here:
        new MenuAdministrador().setVisible(true);
        this.setVisible(false);
    }//GEN-LAST:event_BotaoAdminActionPerformed

    /**
     * @param args the command line arguments
     */

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BotaoAdmin;
    private javax.swing.JLabel TituloMenuInicial;
    private javax.swing.JButton botaoInscrever;
    // End of variables declaration//GEN-END:variables
}
